package com.example.javabasic.elasticsearch.booksearch;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.List;

/**
 * @description 书本实体
 * @Author Lin FuYuan
 * @date 2021/6/16
 */
@Data
public class Book {
    public static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    /**
     * id
     */
    private String id;
    /**
     * 标题
     */
    private String title;
    /**
     * 作者
     */
    private List<String> authors;
    /**
     * 概述
     */
    private String summary;
    /**
     * 发布日期
     */
    private String publishDate;
    /**
     * 发布人
     */
    private String publisher;
    /**
     * 书本内容
     */
    private String values;
    /**
     * 评论数
     */
    private Integer numReviews;


    public Book(String id, String title, List<String> authors, String summary, String publishDate, int numReviews, String publisher,String values) {
       this.id = id ;
       this.title = title;
       this.authors = authors;
       this.summary = summary;
       this.publishDate = publishDate;
       this.numReviews = numReviews;
       this.publisher = publisher;
       this.values  = values;
    }
}
